/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Administrador
 */
@Embeddable
public class VendedorcategoriaPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "cuit")
    private int cuit;
    @Basic(optional = false)
    @NotNull
    @Column(name = "idCategoria")
    private int idCategoria;

    public VendedorcategoriaPK() {
    }

    public VendedorcategoriaPK(int cuit, int idCategoria) {
        this.cuit = cuit;
        this.idCategoria = idCategoria;
    }

    public int getCuit() {
        return cuit;
    }

    public void setCuit(int cuit) {
        this.cuit = cuit;
    }

    public int getIdCategoria() {
        return idCategoria;
    }

    public void setIdCategoria(int idCategoria) {
        this.idCategoria = idCategoria;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) cuit;
        hash += (int) idCategoria;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof VendedorcategoriaPK)) {
            return false;
        }
        VendedorcategoriaPK other = (VendedorcategoriaPK) object;
        if (this.cuit != other.cuit) {
            return false;
        }
        if (this.idCategoria != other.idCategoria) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entidades.VendedorcategoriaPK[ cuit=" + cuit + ", idCategoria=" + idCategoria + " ]";
    }
    
}
